package com.hwpt.chesedemo.utils

import android.content.Context
import com.hw.ble_lib.BleHelper
import com.hwpt.chesedemo.data.local.repository.ChessRepository
import com.hwpt.chesedemo.data.local.repository.ChessRepositoryImpl
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton


@Module
@InstallIn(SingletonComponent::class)
object AppModule {

    @Provides
    @Singleton
    fun provideChessRepository(
        @ApplicationContext context: Context
    ): ChessRepository {
        return ChessRepositoryImpl(context)
    }


    @Provides
    fun provideBleHelper(@ApplicationContext context: Context): BleHelper {
        return BleHelper(context)
    }
}